<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="cms" uri="http://cms.gxsoft.com/tags-cms"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用人单位信息管理--增加</title>
<link href="<%=request.getContextPath()%>/css/reset.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
	function check(){
		var c = document.form1.unitUserLoginName.value; 
    	var reLetterOrDigit = /^[a-zA-Z0-9_]{4,10}$/i;
		var frm = document.form1;
		if(frm.unitUserName.value == ""){
			alert("请输入姓名！");
			frm.unitUserName.focus();
			return false;
		}
		
	    if(!reLetterOrDigit.test(c)) {
			alert("用户名只能是数字、字母、下划线的组合并且位数为4—10位，请重新输入！");
			frm.unitUserLoginName.focus();
			return false;
		}
   		  var pwd = frm.unitUserPassword.value;
		   var pwd1 =frm.unitUserPassword1.value;
		   if(pwd.length <= 16 && pwd.length >= 6) {
			   if (pwd != pwd1) {
			         alert("两个密码不相同");
			         return false;
			      }
			}else{
			 alert("密码为6—16位之间");
			 return false;	
			} 
	}
	function selectEmployer(){
		var arr = showModalDialog("<%=request.getContextPath()%>/EmployerInfo.do?method=find", "", "dialogWidth:550pt;dialogHeight:400pt;help:0;status:0");
		if(arr != null){
			var id = arr[0][0];
			var name = arr[0][1];
			document.form1.unitUserUnitId.value = id;
			document.form1.unit.value = name;
		}
	}
</script>


</head>

<body>
<form name="form1" action="<%=request.getContextPath()%>/UnitUser.do?method=add" method="post" onsubmit="return check()" target="sbt">
<table width="85%">
  <tr>
    <td width="25%" align="right" class="bg_blue"><p><font color="red">*</font>&nbsp;&nbsp;单位：</p>
    </td>
    <td width="75%" align="left" >
    <input type="hidden" name="unitUserUnitId" value="${eInfo.empInfoId }">
    ${eInfo.empInfoName }
    &nbsp;</td>
  </tr>
 <tr>
    <td width="25%" align="right" class="bg_blue"><p><font color="red">*</font>&nbsp;&nbsp;姓名：</p>
    </td>
    <td width="75%" align="left" ><input type="text" name="unitUserName" maxlength="32">&nbsp;</td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p>性别：</p>
    </td>
    <td width="75%" align="left" >
    <select name="unitUserSex"><option value="0">男</option><option value="1">女</option></select>
   </td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p><font color="red">*</font>&nbsp;&nbsp;登陆名：</p>
    </td>
    <td width="75%" align="left" ><input type="text" name="unitUserLoginName" maxlength="32">
	<span class="hui">登录名只能为数字、字母、下划线的组合并且位数为4—10位</span>
	</td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p><font color="red">*</font>&nbsp;&nbsp;密码：</p>
    </td>
    <td width="75%" align="left" ><input type="password" name="unitUserPassword" maxlength="32">
    &nbsp;&nbsp;&nbsp;&nbsp;<span class="hui">密码字符数为6-16位之间，字母、数字、符号均可</span>
    </td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p><font color="red">*</font>&nbsp;&nbsp;确认密码：</p>
    </td>
    <td width="75%" align="left" >
    <input class="registerinput" type="password" id="lname1" name="unitUserPassword1" value="" onblur=""/>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hui">请再次输入上面的密码</span>
    </td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p>部门：</p>
    </td>
    <td width="75%" align="left" ><input type="text" name="unitUserDepart" maxlength="25">&nbsp;</td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p>职务：</p>
    </td>
    <td width="75%" align="left" ><input type="text" name="unitUserDuty" maxlength="25">&nbsp;</td>
  </tr>
   <tr>
    <td colspan="2" align="center" class="nohover">
    <input type="submit" class="buttonsubmit" onClick="" value="提交"/>&nbsp;
     <input type="reset" class="buttonreset" value="重置"/>
    <input type="button" class="buttonreturn" onClick="history.back(-1);" value="返回"/></td>
  </tr>
</table>
</form>
</body>
</html>
<iframe name="sbt" src="" frameBorder="0" width="0" height="0"></iframe>
